<?php
namespace app\index\controller;

use app\index\controller\common as common;

use app\index\model\Asset_to_shot as Asset_to_shot;
use app\index\model\Shot as Shot;

use app\index\validate\ShotLinkAssetscheck;
use app\index\validate\Sceneidcheck;



class ShotLinkAssets extends common
{
   public function shot_link_assets(){
	   	/*验证参数*/
	    $validate = new ShotLinkAssetscheck();
	    list($msg,$result)= $validate->goapiCheck();
	    if($msg){
		   	list($msg,$result) = Asset_to_shot::add_data() ;
		    }
	    return returnresult($msg,$result) ;    	 
	}
   
   public function find_scene_link(){
        /*验证参数*/
        $validate = new Sceneidcheck();
        list($msg,$result)= $validate->goapiCheck();
        if($msg){

            list($msg,$result) = Asset_to_shot::get_data() ;
            Shot::update_data(['status'=>0,'id'=>input('shot_id')]) ;
            }
        return returnresult($msg,$result) ;  
   }

}

